package cn.tedu._04mybatis02.mapper;

import cn.tedu._04mybatis02.pojo.entity.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface UserMapper {
    @Insert("INSERT INTO user(username,password,nickname,created) VALUES(#{username},#{password},#{nickname},#{created})")
    int insert(User user);

    @Delete("DELETE FROM user WHERE username=#{username}")
    int deleteUserByName(String username);
}
